package com.jingHang.controller;

import com.jingHang.common.ServerResponse;
import com.jingHang.pojo.OrderInfo;
import com.jingHang.service.IOrderInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

//加上控制层的注解
@Controller
//定义url映射路径
@RequestMapping(value = "/order_info")
public class OrderInfoController {

    @Autowired
    private IOrderInfoService orderInfoService1;
    @Autowired
    private IOrderInfoService orderInfoService2;

    @RequestMapping(value = "/get_order_info.do",method = RequestMethod.GET)
    @ResponseBody
    public ServerResponse<OrderInfo> getOrderInfo(int id){
        return orderInfoService1.selectById(id);
    }

}
